package foundation.high_precision_addition;

import java.util.Scanner;

/**
 * 输入两个整数a和b，输出这两个整数的和。a和b都不超过100位。
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.nextLine();
        String b = sc.nextLine();
        int len_a = a.length();
        int len_b = b.length();
        int len = len_a >= len_b ? len_a : len_b;
        int[] a_arr = new int[len];
        int[] b_arr = new int[len];
        // 从最低位开始补位
        int j = len_a - 1;
        for (int i = len - 1; i >= len - len_a; --i) {
            a_arr[i] = Character.getNumericValue(a.charAt(j --));
        }
        for (int i = 0; i < len - len_a; i++) {
            a_arr[i] = 0;
        }
        int z = len_b - 1;
        for (int i = len - 1; i >= len - len_b; --i) {
            b_arr[i] = Character.getNumericValue(b.charAt(z --));
        }
        for (int i = 0; i < len - len_b; i++) {
            b_arr[i] = 0;
        }
        // 进行加法
        int p = 0;
        int[] res = new int[len];
        for (int i = len - 1; i >= 0; --i) {
            p = a_arr[i] + b_arr[i] + p;
            res[i] = p % 10;
            p = p / 10;
        }
        if (p != 0) {
            System.out.print(p);
        }
        for (int i = 0; i < len; i++) {
            System.out.print(res[i]);
        }
    }
}
